<template>
  <div class="buyThing" @click="goToDeviceList()">
    <i class="iconfont">&#xe619;</i>
    <span>购买</span>
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted, onUnmounted } from 'vue';
import { useRouter } from 'vue-router';
import wechatQRCode from '@/assets/images/二维码.png';
import alipayQRCode from '@/assets/images/二维码.png';

const router = useRouter();

const goToDeviceList = () => {
  router.push('/device-list');
};

const paymentMethod = ref('wechat');

</script>

<style scoped lang="scss">
.buyThing {
  position: fixed;
  bottom: 202px;
  right: 20px;
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 8px;
  /* 圆角 */
  box-sizing: border-box;
  // width: 40px; /* 增加宽度以适应文字 */
  // height: 40px; /* 自动高度 */
  display: flex;
  flex-direction: column;
  /* 文字在图标下面 */
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  /* 更深的阴影 */
  cursor: pointer;
  transition: background-color 0.3s ease;
  /* 添加过渡效果 */

  i {
    font-size: 12px;
    color: #0d1216;
  }

  span {
    font-size: 12px;
    color: #0d1216;
    margin-top: 5px;
    /* 图标和文字之间的间距 */
  }

  &:hover {
    background-color: #f0f0f0;
  }
}

.el-dialog {
  p {
    margin-bottom: 10px;
  }

  .payment-methods {
    margin-top: 20px;
  }

  .qr-code {
    margin-top: 20px;
    text-align: center;

    img {
      height: 200px;
    }
  }
}
</style>
